import request from '@/utils/request'

export function login(data) {
  return request({
    url: 'api/v1/backend/user/oauth/token',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: 'api/v1/ajax_public_user_info',
    method: 'post',
    token
  })
}

export function getLeftMenus() {
  return request({
    url: 'api/v1/backend/menu/left',
    method: 'post'
  })
}

export function logout() {
  return request({
    url: '/user/logout',
    method: 'post'
  })
}
